package domain.entities;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * Created with IntelliJ IDEA.
 * User: nico
 * Date: 06/11/12
 * Time: 18:28
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name = "ongoing", catalog = "bms")
public class Ongoing implements Serializable {

    private Integer id;
    private Date initialPackageSent;
    private Date preStudyEvaluationVisit;
    private Date siteApprovedHUM;
    private Date siv;
    private Date submissionMOH;
    private Date approvalMOH;
    private Date submissionFEFYM;
    private Date approvalFEFYM;
    private String localApprovedBy;
    private String otherLocalApproved;
    private Date submissionLocal;
    private Date approvalLocal;
    private String localApprovalFile;
    private Integer actualPtsEnrolled;
    private Integer actualPtsRandomized;

    private Date ctpComplete;
    private Date siteActivation;
    private Integer actualPtsActive;
    private Date plannedFPFVSite;
    private Date siteClosure;
    private String specialRecruitmentActions;
    private String specialRecruitmentActionsDescription;
    private String inspection;
    private String inspectionMOH;
    private String inspectionAction;
    private String bmsAudit;
    private String outcomeBms;
    private String ecAudit;
    private String outcomeEc;

    private Date lastModification;

    private Date actualFpfv;
    private Date actualLpfv;
    private Date actualLplv;

    public Ongoing() {}

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Temporal(TemporalType.DATE)
    @Column(length = 10)
    public Date getInitialPackageSent() {
        return initialPackageSent;
    }

    public void setInitialPackageSent(Date initialPackageSent) {
        this.initialPackageSent = initialPackageSent;
    }

    @Temporal(TemporalType.DATE)
    @Column(length = 10)
    public Date getPreStudyEvaluationVisit() {
        return preStudyEvaluationVisit;
    }

    public void setPreStudyEvaluationVisit(Date preStudyEvaluationVisit) {
        this.preStudyEvaluationVisit = preStudyEvaluationVisit;
    }

    @Temporal(TemporalType.DATE)
    @Column(length = 10)
    public Date getSiteApprovedHUM() {
        return siteApprovedHUM;
    }

    public void setSiteApprovedHUM(Date siteApprovedHUM) {
        this.siteApprovedHUM = siteApprovedHUM;
    }

    @Temporal(TemporalType.DATE)
    @Column(length = 10)
    public Date getSiv() {
        return siv;
    }

    public void setSiv(Date siv) {
        this.siv = siv;
    }

    @Temporal(TemporalType.DATE)
    @Column(length = 10)
    public Date getSubmissionMOH() {
        return submissionMOH;
    }

    public void setSubmissionMOH(Date submissionMOH) {
        this.submissionMOH = submissionMOH;
    }

    @Temporal(TemporalType.DATE)
    @Column(length = 10)
    public Date getApprovalMOH() {
        return approvalMOH;
    }

    public void setApprovalMOH(Date approvalMOH) {
        this.approvalMOH = approvalMOH;
    }

    @Temporal(TemporalType.DATE)
    @Column(length = 10)
    public Date getSubmissionFEFYM() {
        return submissionFEFYM;
    }

    public void setSubmissionFEFYM(Date submissionFEFYM) {
        this.submissionFEFYM = submissionFEFYM;
    }

    @Temporal(TemporalType.DATE)
    @Column(length = 10)
    public Date getApprovalFEFYM() {
        return approvalFEFYM;
    }

    public void setApprovalFEFYM(Date approvalFEFYM) {
        this.approvalFEFYM = approvalFEFYM;
    }

    public String getLocalApprovedBy() {
        return localApprovedBy;
    }

    public void setLocalApprovedBy(String localApprovedBy) {
        this.localApprovedBy = localApprovedBy;
    }

    public String getOtherLocalApproved() {
        return otherLocalApproved;
    }

    public void setOtherLocalApproved(String otherLocalApproved) {
        this.otherLocalApproved = otherLocalApproved;
    }

    @Temporal(TemporalType.DATE)
    @Column(length = 10)
    public Date getSubmissionLocal() {
        return submissionLocal;
    }

    public void setSubmissionLocal(Date submissionLocal) {
        this.submissionLocal = submissionLocal;
    }

    @Temporal(TemporalType.DATE)
    @Column(length = 10)
    public Date getApprovalLocal() {
        return approvalLocal;
    }

    public void setApprovalLocal(Date approvalLocal) {
        this.approvalLocal = approvalLocal;
    }

    public String getLocalApprovalFile() {
        return localApprovalFile;
    }

    public void setLocalApprovalFile(String localApprovalFile) {
        this.localApprovalFile = localApprovalFile;
    }

    @Temporal(TemporalType.DATE)
    @Column(length = 10)
    public Date getCtpComplete() {
        return ctpComplete;
    }

    public void setCtpComplete(Date ctpComplete) {
        this.ctpComplete = ctpComplete;
    }

    @Temporal(TemporalType.DATE)
    @Column(length = 10)
    public Date getSiteActivation() {
        return siteActivation;
    }

    public void setSiteActivation(Date siteActivation) {
        this.siteActivation = siteActivation;
    }

    public Integer getActualPtsActive() {
        return actualPtsActive;
    }

    public void setActualPtsActive(Integer actualPtsActive) {
        this.actualPtsActive = actualPtsActive;
    }

    @Temporal(TemporalType.DATE)
    @Column(length = 10)
    public Date getPlannedFPFVSite() {
        return plannedFPFVSite;
    }

    public void setPlannedFPFVSite(Date plannedFPFVSite) {
        this.plannedFPFVSite = plannedFPFVSite;
    }

    @Temporal(TemporalType.DATE)
    @Column(length = 10)
    public Date getSiteClosure() {
        return siteClosure;
    }

    public void setSiteClosure(Date siteClosure) {
        this.siteClosure = siteClosure;
    }

    public String getSpecialRecruitmentActions() {
        return specialRecruitmentActions;
    }

    public void setSpecialRecruitmentActions(String specialRecruitmentActions) {
        this.specialRecruitmentActions = specialRecruitmentActions;
    }

    public String getSpecialRecruitmentActionsDescription() {
        return specialRecruitmentActionsDescription;
    }

    public void setSpecialRecruitmentActionsDescription(String specialRecruitmentActionsDescription) {
        this.specialRecruitmentActionsDescription = specialRecruitmentActionsDescription;
    }

    public String getInspection() {
        return inspection;
    }

    public void setInspection(String inspection) {
        this.inspection = inspection;
    }

    public String getInspectionMOH() {
        return inspectionMOH;
    }

    public void setInspectionMOH(String inspectionMOH) {
        this.inspectionMOH = inspectionMOH;
    }

    public String getInspectionAction() {
        return inspectionAction;
    }

    public void setInspectionAction(String inspectionAction) {
        this.inspectionAction = inspectionAction;
    }

    public String getBmsAudit() {
        return bmsAudit;
    }

    public void setBmsAudit(String bmsAudit) {
        this.bmsAudit = bmsAudit;
    }

    public String getOutcomeBms() {
        return outcomeBms;
    }

    public void setOutcomeBms(String outcomeBms) {
        this.outcomeBms = outcomeBms;
    }

    public String getEcAudit() {
        return ecAudit;
    }

    public void setEcAudit(String ecAudit) {
        this.ecAudit = ecAudit;
    }

    public String getOutcomeEc() {
        return outcomeEc;
    }

    public void setOutcomeEc(String outcomeEc) {
        this.outcomeEc = outcomeEc;
    }

    public Integer getActualPtsEnrolled() {
        return actualPtsEnrolled;
    }

    public void setActualPtsEnrolled(Integer actualPtsEnrolled) {
        this.actualPtsEnrolled = actualPtsEnrolled;
    }

    public Integer getActualPtsRandomized() {
        return actualPtsRandomized;
    }

    public void setActualPtsRandomized(Integer actualPtsRandomized) {
        this.actualPtsRandomized = actualPtsRandomized;
    }

    @Temporal(TemporalType.DATE)
    @Column(length = 10)
    public Date getLastModification() {
        return lastModification;
    }

    public void setLastModification(Date lastModification) {
        this.lastModification = lastModification;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "actualFPFV", length = 10)
    public Date getActualFpfv() {
        return this.actualFpfv;
    }

    public void setActualFpfv(Date actualFpfv) {
        this.actualFpfv = actualFpfv;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "actualLPFV", length = 10)
    public Date getActualLpfv() {
        return this.actualLpfv;
    }

    public void setActualLpfv(Date actualLpfv) {
        this.actualLpfv = actualLpfv;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "actualLPLV", length = 10)
    public Date getActualLplv() {
        return this.actualLplv;
    }

    public void setActualLplv(Date actualLplv) {
        this.actualLplv = actualLplv;
    }


    private InvestigadorProtocoloCentro investigadorProtocoloCentro;

    @OneToOne(cascade = CascadeType.ALL)
    @JoinColumns({
            @JoinColumn(name = "investigadorid", referencedColumnName = "INVESTIGADORid"),
            @JoinColumn(name = "protocoloCentrocentroid", referencedColumnName = "PROTOCOLO_CENTROCENTROid"),
            @JoinColumn(name = "protocoloCentroprotocoloCompromisopaisprotocoloid", referencedColumnName = "protocolo_centroprotocolo_compromisopaisprotocoloid"),
            @JoinColumn(name = "protocoloCentroprotocoloCompromisopaiscompromisopaisid", referencedColumnName = "protocolo_centroprotocolo_compromisopaiscompromisopaisid")
    })
    public InvestigadorProtocoloCentro getInvestigadorProtocoloCentro() {
        return investigadorProtocoloCentro;
    }

    public void setInvestigadorProtocoloCentro(InvestigadorProtocoloCentro investigadorProtocoloCentro) {
        this.investigadorProtocoloCentro = investigadorProtocoloCentro;
    }
}

